﻿
<template>
    <div style="height:100%;">
        <Row>
            <Col span="24" class="col-margin">
            <!--根据需求删除不不要查询条件-->
            所属地区：
            <Select v-model="searchModel.AreaCode"  placeholder="请选择..." style="width: 100px" >
                <Option :value="userInfo.AreaCode">{{(userInfo.AreaCode=='530000000000')?'全省':'全市（州）'}}</Option>
                <Option :value="item.value" v-for="item in AreaList" :key="item.value">{{item.label}}</Option>
            </Select>
             填报年度：
            <Select v-model="searchModel.FillInYear" placeholder="全部" style="width: 200px" >
                <!-- <Option value="">全部</Option> -->
                <Option :value="item.DictValue" v-for="item in yearList" :key="item.DictValue">{{item.DictText}}</Option>
            </Select>
            填报周期：
            <Select  v-model="searchModel.TimesCycle" placeholder="请选择季节值..." style="width:100px;">
                <Option value="">全部</Option>
                <Option :value="item.DictValue" v-for="item in QuarterList" :key="item.DictValue">{{item.DictText}}</Option>
            </Select>
            报表状态：
            <Select v-model="searchModel.Status" placeholder="全部" style="width: 200px" >
                <Option value="">全部</Option>
                <Option :value="item.DictValue" v-for="item in statusList" :key="item.DictValue">{{item.DictText}}</Option>
            </Select>
            <Button icon="ios-search" type="ghost" @click="getPageData()">查询</Button>
            </Col>
        </Row>
        <Row>
            <Col span="24" class="col-margin">            
            <Table size="small"  :height="clientHeight" border  :columns="columnsList" :data="datas.rows" no-data-text='暂无数据...'></Table>
            </Col>
        </Row>
        <Row>
            <Col span="24">
            <Page class="page-style" :total="datas.total" placement="top" @on-change="getPageNumber" :page-size="searchModel.PageSize" :page-size-opts='pageSizeOpts' show-sizer @on-page-size-change="getPageSize" show-total show-elevator></Page>
            </Col>
        </Row>
        <!-- <Modal v-model="showType" :mask-closable="false" width="1500">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">{{AreaName}}-（二）{{TimesCycleName}}-马铃薯生产情况统计表</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p> 
            <div style="overflow:auto">          
            <table class="reptable" style="width:3000px;margin-bottom:30px;">
                    <thead>
                        <tr>                            
                            <th rowspan="3">季节</th>
                            <th rowspan="3">播种、收获时间</th>
                            <th rowspan="3">主推品种</th>
                            <th rowspan="3">总面积（万亩）</th>
                            <th rowspan="3">总产量（万吨）</th>
                            <th rowspan="3">平均亩产（公斤/亩）</th>
                            <th rowspan="3">亩产值（元）</th>
                            <th rowspan="3">总产值（万元）</th>
                            <th rowspan="3">技术模式</th>
                            <th rowspan="3">脱毒种薯覆盖率%</th>
                            <th rowspan="3">地膜覆盖面积（万亩）</th>
                            <th rowspan="3">膜下滴灌面积（万亩）</th>
                            <th rowspan="3">配方施肥面积（万亩）</th>
                            <th rowspan="3">免耕栽培面积（万亩）</th>
                            <th colspan="6">净作</th>
                            <th colspan="6">间作、套种</th>
                            <th colspan="5">机械化生产</th>
                            <th colspan="11">亩均收益</th>
                        </tr>
                        <tr>
                            <th rowspan="2">面积（万亩）</th>
                            <th rowspan="2">产量（万吨）</th>
                            <th rowspan="2">平均亩产（公斤/亩）</th>
                            <th rowspan="2">亩产值（元）</th>
                            <th rowspan="2">种植密度（株/亩）</th>
                            <th rowspan="2">技术模式</th>
                            <th rowspan="2">面积（万亩）</th>
                            <th rowspan="2">马铃薯产量（万吨）</th>
                            <th rowspan="2">马铃薯平均亩产（公斤/亩）</th>
                            <th rowspan="2">复合亩产（公斤/亩）</th>
                            <th rowspan="2">复合亩产值（元）</th>
                            <th rowspan="2">种植模式</th>
                            <th rowspan="2">机械播种面积（万亩）</th>
                            <th colspan="3">机械田间管理面积（万亩）</th>
                            <th rowspan="2">机械收获面积（万亩）</th>
                            <th colspan="7">投入（元）</th>
                            <th colspan="3">产出</th>
                            <th rowspan="2">收益</th>
                        </tr>
                        <tr>
                            <th>其中：中耕培土</th>
                            <th>施肥</th>
                            <th>施药</th>
                            <th>种薯</th>
                            <th>肥料</th>
                            <th>农药</th>
                            <th>地膜</th>
                            <th>全生育期用工费</th>
                            <th>其他</th>
                            <th>投入合计</th>   
                            <th>平均亩产（公斤/亩）</th>
                            <th>平均单价（元/公斤）</th>
                            <th>产出合计（元）</th>                         
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(dataModel,index) in dataList" :key="index">
                            <td>
                                {{dataModel.SeasonDict}}
                            </td>
                            <td>
                                {{dataModel.PHTime}}
                            </td>
                            <td>
                                {{dataModel.MainVariety}}
                            </td>
                            <td>
                                {{dataModel.TotalArea}}
                            </td>  
                            <td>
                                {{dataModel.TotalYield}}
                            </td>
                            <td>
                                {{dataModel.AvgMuYield}}
                            </td>
                            <td>
                                {{dataModel.MuOutput}}
                            </td> 
                            <td>
                                {{dataModel.TotalOutput}}
                            </td>
                            <td>
                                {{dataModel.TechModel}}
                            </td>
                            <td>
                                {{dataModel.SeedCoverage}}
                            </td>
                            <td>
                                {{dataModel.MulchArea}}
                            </td>
                            <td>
                                {{dataModel.DripArea}}
                            </td> 
                            <td>
                                {{dataModel.FertilizerArea}}
                            </td>
                            <td>
                                {{dataModel.NoCultivationArea}}
                            </td>
                            <td>
                                {{dataModel.JZArea}}
                            </td>   
                            <td>
                                {{dataModel.JZYield}}
                            </td>
                            <td>
                                {{dataModel.JZAvgMuYield}}
                            </td>
                            <td>
                                {{dataModel.JZMuOutput}}
                            </td>
                            <td>
                                {{dataModel.JZDensity}}
                            </td> 
                            <td>
                                {{dataModel.JZTechModel}}
                            </td> 
                            <td>
                                {{dataModel.JTArea}}
                            </td>  
                            <td>
                                {{dataModel.JTYield}}
                            </td> 
                            <td>
                                {{dataModel.JTAvgMuYield}}
                            </td> 
                            <td>
                                {{dataModel.JTMixMuYield}}
                            </td>
                            <td>
                                {{dataModel.JTMixMuOutput}}
                            </td>
                            <td>
                                {{dataModel.JTTechModel}}
                            </td> 
                            <td>
                                {{dataModel.MechPlantArea}}
                            </td>
                            <td>
                                {{dataModel.MechCultivationArea}}
                            </td>
                            <td>
                                {{dataModel.MechFertilizerArea}}
                            </td>
                            <td>
                                {{dataModel.MechPesticideArea}}
                            </td> 
                            <td>
                                {{dataModel.MechHarvestArea}}
                            </td> 
                            <td>
                                {{dataModel.SeedCost}}
                            </td> 
                            <td>
                                {{dataModel.FertilizerCost}}
                            </td> 
                            <td>
                                {{dataModel.PesticideCost}}
                            </td>
                            <td>
                                {{dataModel.MulchCost}}
                            </td>
                            <td>
                                {{dataModel.LaborCost}}
                            </td>
                            <td>
                                {{dataModel.OtherCost}}
                            </td>
                            <td>
                                {{dataModel.TotalCost}}
                            </td>
                            <td>
                                {{dataModel.OAvgMuYield}}
                            </td> 
                            <td>
                                {{dataModel.OAvgPrice}}
                            </td>
                            <td>
                                {{dataModel.OTotalOutput}}
                            </td>
                            <td>
                                {{dataModel.Income}}
                            </td>
                        </tr>
                    </tbody>
                </table>
                </div>
            <div slot="footer" style="padding-bottom:50px">
                 <Alert style="margin-top:5px;text-align:left" banner type="error">
                    填报时间：每年7月1日（冬马铃薯）、10月30日（大春马铃薯）、12月30日（秋马铃薯）
                    <p>填报说明: 1.全省范围内从乡（镇）起，逐级全面统计，由县级填报经州（市）审核后上报。</p>
                    <p>2.投入合计=种薯+肥料+农药+地膜+用工费+其他投入实际金额；产出合计=平均亩产X平均单价；收益=产出合计-投入合计。</p>                                      
                    <span slot="desc">
                    </span>
                </Alert>
            </div>
        </Modal> -->
        <Modal v-model="showAudit" :mask-closable="false" width="500">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">退回重报原因</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p>
            <Input type="textarea" :rows="4" v-model="unPassReason" placeholder="请输入不通过原因..."></Input>
            <div slot="footer">
                <Button type="primary" @click="unpass()">确定</Button>
                <Button type="ghost" @click="showAudit=false" style="margin-left: 8px">取消</Button>
            </div>
        </Modal>
        <Modal v-model="showType" :mask-closable="false" width="1200" :styles="{top:'10px'}">
            <p slot="header" class="title">
                <Icon type="ios-paper" size="20"></Icon>
                <span style="font-size: 20px">{{AreaName}}-（二）{{TimesCycleName}}-马铃薯生产情况统计表</span>
            </p>
            <p slot="close">
                <Icon type="close-circled" color="red" size=25></Icon>
            </p> 
            <div style="overflow:auto;height:600px">   
                <Tabs> 
                    <TabPane :label="dataModel.SeasonDict" v-for="(dataModel,index) in dataList" :key="index">      
                        <table class="reptable" style="margin-bottom:30px;">
                        <thead>
                            <tr>
                                <th rowspan="3">播种、收获时间</th>
                                <!-- <th rowspan="3">主推品种</th> -->
                                <th rowspan="3">总面积（万亩）</th>
                                <th rowspan="3">总产量（万吨）</th>
                                <th rowspan="3">平均亩产（公斤/亩）</th>
                                <th rowspan="3">亩产值（元）</th>
                                <th rowspan="3">总产值（万元）</th>
                                <th rowspan="3">技术模式</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    {{dataModel.PHTime}}
                                </td>
                                <!-- <td>
                                    {{dataModel.MainVariety}}
                                </td> -->
                                <td>
                                    {{dataModel.TotalArea}}
                                </td>  
                                <td>
                                    {{dataModel.TotalYield}}
                                </td>
                                <td>
                                    {{dataModel.AvgMuYield}}
                                </td>
                                <td>
                                    {{dataModel.MuOutput}}
                                </td> 
                                <td>
                                    {{dataModel.TotalOutput}}
                                </td>
                                <td>
                                    {{dataModel.TechModel}}
                                </td>
                            </tr>
                            <tr><th></th></tr>
                            <tr>
                                <th >脱毒种薯覆盖面积（万亩）</th>
                                <th >脱毒种薯覆盖率%</th>
                                <th >地膜覆盖面积（万亩）</th>
                                <th >膜下滴灌面积（万亩）</th>
                                <th >配方施肥面积（万亩）</th>
                                <th >免耕栽培面积（万亩）</th>
                            </tr>
                            <tr >
                                <td>
                                    {{dataModel.tdSeedArea}}
                                </td>
                                <td>
                                    {{dataModel.SeedCoverage}}
                                </td>
                                <td>
                                    {{dataModel.MulchArea}}
                                </td>
                                <td>
                                    {{dataModel.DripArea}}
                                </td> 
                                <td>
                                    {{dataModel.FertilizerArea}}
                                </td>
                                <td>
                                    {{dataModel.NoCultivationArea}}
                                </td>
                            </tr>
                            <tr><th></th></tr>
                            <tr>
                                <th colspan="6">净作</th>
                            </tr>
                            <tr>
                                <th >面积（万亩）</th>
                                <th >产量（万吨）</th>
                                <th >平均亩产（公斤/亩）</th>
                                <th >亩产值（元）</th>
                                <th >种植密度（株/亩）</th>
                                <th >技术模式</th>
                            </tr>
                            <tr >
                                <td>
                                    {{dataModel.JZArea}}
                                </td>   
                                <td>
                                    {{dataModel.JZYield}}
                                </td>
                                <td>
                                    {{dataModel.JZAvgMuYield}}
                                </td>
                                <td>
                                    {{dataModel.JZMuOutput}}
                                </td>
                                <td>
                                    {{dataModel.JZDensity}}
                                </td> 
                                <td>
                                    {{dataModel.JZTechModel}}
                                </td>
                            </tr>
                            <tr><th></th></tr>
                            <tr>
                                <th colspan="6">间作、套种</th>
                            </tr>
                            <tr>
                                <th >面积（万亩）</th>
                                <th >马铃薯产量（万吨）</th>
                                <th >马铃薯平均亩产（公斤/亩）</th>
                                <th >复合亩产（公斤/亩）</th>
                                <th >复合亩产值（元）</th>
                                <th >种植模式</th>
                            </tr>
                            <tr >
                                <td>
                                    {{dataModel.JTArea}}
                                </td>  
                                <td>
                                    {{dataModel.JTYield}}
                                </td>
                                <td>
                                    {{dataModel.JTAvgMuYield}}
                                </td>  
                                <td>
                                    {{dataModel.JTMixMuYield}}
                                </td>
                                <td>
                                    {{dataModel.JTMixMuOutput}}
                                </td>
                                <td>
                                    {{dataModel.JTTechModel}}
                                </td> 
                            </tr>
                            <tr><th></th></tr>
                            <tr>
                                <th colspan="5">机械化生产</th>
                            </tr>
                            <tr>
                                <th rowspan="2">机械播种面积（万亩）</th>
                                <th colspan="3">机械田间管理面积（万亩）</th>
                                <th rowspan="2">机械收获面积（万亩）</th>
                            </tr>
                            <tr>
                                <th>其中：中耕培土</th>
                                <th>施肥</th>
                                <th>施药</th>                  
                            </tr>
                            <tr >
                                <td>
                                    {{dataModel.MechPlantArea}}
                                </td>
                                <td>
                                    {{dataModel.MechCultivationArea}}
                                </td>
                                <td>
                                    {{dataModel.MechFertilizerArea}}
                                </td>
                                <td>
                                    {{dataModel.MechPesticideArea}}
                                </td> 
                                <td>
                                    {{dataModel.MechHarvestArea}}
                                </td>
                            </tr>
                            <tr><th></th></tr>
                            <tr>
                                <th colspan="11">亩均收益</th>
                            </tr>
                            <tr>
                                <th colspan="7">投入（元）</th>
                                <th colspan="3">产出</th>
                                <th rowspan="2">收益</th>
                            </tr>
                            <tr>
                                <th>种薯</th>
                                <th>肥料</th>
                                <th>农药</th>
                                <th>地膜</th>
                                <th>全生育期用工费</th>
                                <th>其他</th>
                                <th>投入合计</th>   
                                <th>平均亩产（公斤/亩）</th>
                                <th>平均单价（元/公斤）</th>
                                <th>产出合计（元）</th>                         
                            </tr>
                            <tr >
                                <td>
                                    {{dataModel.SeedCost}}
                                </td> 
                                <td>
                                    {{dataModel.FertilizerCost}}
                                </td> 
                                <td>
                                    {{dataModel.PesticideCost}}
                                </td>
                                <td>
                                    {{dataModel.MulchCost}}
                                </td>
                                <td>
                                    {{dataModel.LaborCost}}
                                </td>
                                <td>
                                    {{dataModel.OtherCost}}
                                </td>
                                <td>
                                    {{dataModel.TotalCost}}
                                </td>
                                <td>
                                    {{dataModel.OAvgMuYield}}
                                </td> 
                                <td>
                                    {{dataModel.OAvgPrice}}
                                </td>
                                <td>
                                    {{dataModel.OTotalOutput}}
                                </td>
                                <td>
                                    {{dataModel.Income}}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </TabPane>
                </Tabs>
            </div>
            <div slot="footer" style="padding-bottom:50px">
                <div style="text-align:right;padding-top:5px" v-show="showEdit">
                    <Button type="primary" @click="pass()">审核通过</Button>
                    <Button type="warning" @click="showType = false,showAudit=true">退回重报</Button>
                </div>
                 <Alert style="margin-top:5px;text-align:left" banner type="error">
                    填报时间：每年7月1日（冬马铃薯）、10月30日（大春马铃薯）、12月30日（秋马铃薯）
                    <p>填报说明: 1.全省范围内从乡（镇）起，逐级全面统计，由县级填报经州（市）审核后上报。</p>
                    <p>2.投入合计=种薯+肥料+农药+地膜+用工费+其他投入实际金额；产出合计=平均亩产X平均单价；收益=产出合计-投入合计。</p>                                      
                    <span slot="desc">
                    </span>
                </Alert>
            </div>
        </Modal>
    </div>
</template>
<script>
export default {
    data() {
        return {
            showType: false,//编辑框弹出状态
            showEdit:false,//是否显示审核页
            showAudit:false,//是否显示审核不通过原因页
            yearList: this.GetGroupDict("ReportYear"), 
            statusList: this.GetGroupDict("ReportStatus"), 
            ReportId:'',  
            unPassReason:'' , 
            dataList:[],
            AreaName:'',
            TimesCycleName:'',
            QuarterList: this.GetGroupDict("QuarterCycleValue"),   
            dataModel: {//编辑模型
                Id: '',
                ReportId:'', 
                SeasonDict:'', 
                SeasonValue:'', 
                PseasonValue:'', 
                PHTime:'', 
                MainVariety:'', 
                TotalArea:'', 
                TotalYield:'', 
                AvgMuYield:'', 
                MuOutput:'', 
                TotalOutput:'', 
                TechModel:'', 
                SeedCoverage:'', 
                MulchArea:'', 
                DripArea:'', 
                FertilizerArea:'', 
                NoCultivationArea:'', 
                JZArea:'', 
                JZAvgMuYield:'', 
                JZMuOutput:'', 
                JZDensity:'', 
                JZTechModel:'', 
                JTArea:'', 
                JTAvgMuYield:'', 
                JTMixMuYield:'', 
                JTMixMuOutput:'', 
                JTTechModel:'', 
                MechPlantArea:'', 
                MechCultivationArea:'', 
                MechFertilizerArea:'', 
                MechPesticideArea:'', 
                MechHarvestArea:'', 
                SeedCost:'', 
                FertilizerCost:'', 
                PesticideCost:'', 
                MulchCost:'', 
                LaborCost:'', 
                OtherCost:'', 
                TotalCost:'', 
                OAvgMuYield:'', 
                OAvgPrice:'', 
                OTotalOutput:'', 
                Income:'', 
            },
            clientHeight: window.innerHeight - 218,//表格默认高度
            userInfo:this.GetlocaStorage("potUserinfo"),
            AreaList: [], //所属行政区划数组,
            //查询模型：根据需求删除不不要查询条件
            searchModel: {
                AreaCode:this.GetlocaStorage("potUserinfo").AreaCode,
                ReportCode:'PotSeasonProduct',
                FillInYear: new Date().getFullYear() + "",
                TimesCycle:'0',
                Status:'3',  
                PageNumber: 1, PageSize: 20
            },
            pageSizeOpts: [20, 40, 50],//默认分页最大设置
            datas: {},//table数据对象
            columnsList: [//表头对象
                {
                    title: '报表名称',
                    key: 'ReportName',
                    ellipsis: true,                   
                },
                {
                    title: '归属地区',
                    key: 'AreaCodeName',
                    width: 120
                },
                {
                    title: '填报年度',
                    key: 'FillInYearName',
                    width: 120
                },
                {
                    title: "报表状态",
                    key: "StatusName",
                    width: 120,
                    render: (h, params) => {
                        switch (params.row.Status * 1) {
                            case 0: //审核未通过
                                return h('span', { class: { Error: true } }, params.row.StatusName);
                            case 1: //未填报
                                return h('span', { class: { NoReport: true } }, params.row.StatusName);
                            case 2: //已填报
                                return h('span', { class: { AlreadyReport: true } }, params.row.StatusName);
                            case 3: //已上报
                                return h('span', { class: { UpReport: true } }, params.row.StatusName);
                            case 4: //审核通过
                                return h('span', { class: { Success: true } }, params.row.StatusName);
                            case 5: //锁定
                                return h('span', { class: { error: true } }, params.row.StatusName);
                            default:
                                return h('span', { class: { Default: true } }, params.row.StatusName);
                        }
                    }
                },
                {
                    title: '添加时间',
                    key: 'StrUpdateTime',
                    ellipsis: true
                },
                {
                    title: '操作',
                    key: 'action',
                    width: 350,
                    align: 'center',
                    render: (h, params) => {
                        return h('div', [
                            h('Button', {
                                class: { ieditColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-compose'
                                },
                                style: { marginRight: '5px', marginTop: '10px' },
                                on: {
                                    click: () => { 
                                        this.TimesCycleName = params.row.TimesCycleName;
                                        console.log(params.row.TimesCycleName)
                                        this.AreaName = params.row.AreaCodeName;
                                        this.ShowInfo(params.row.Id,params.row.TimesCycle); }
                                }
                            }, '查看'),                           
                            h('Button', {
                                class: { ieditColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'network'
                                },
                                attrs: {
                                    disabled: params.row.Status == 3 ? false : true
                                },
                                style: { marginRight: '5px', marginTop: '10px' },
                                on: {
                                    click: () => { 
                                        this.TimesCycleName = params.row.TimesCycleName;
                                        this.AreaName = params.row.AreaCodeName;
                                        this.EditInfo(params.row.Id,params.row.TimesCycle);
                                    }
                                }
                            }, '审核'),
                            h('Button', {
                                class: { ideleteColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-undo'
                                },
                                style: {
                                    marginRight: '5px',marginTop: '10px'
                                },
                                on: {
                                    click: () => {
                                        this.unReview(params.row.Id)
                                    }
                                },
                                attrs: {
                                    disabled: params.row.Status == 4 ? false : true
                                },                               
                            }, '取消审核'),

                        ]);
                    }
                }]
        }
    },
    mounted() {
        //table高度计算方法
        const that = this;
        window.onresize = () => {
            return (() => {
                that.clientHeight = window.innerHeight - 218;
            })()
        };
    },
    methods: {
        //获取当前页码
        getPageNumber(pageIndex) {
            this.searchModel.PageNumber = pageIndex;
            this.getPageData();
        },
        //获取当前分页大小
        getPageSize(pageSize) {
            this.searchModel.PageSize = pageSize;
            this.getPageData();
        },
        //获取this.datas: {},//table数据对象
        getPageData() {
            var self = this;
            self.$http.post('Report/PostPageList', this.searchModel).then(function (res) {
                if (res.data.status === 1) {
                    self.datas = res.data;
                }
                else {
                    self.$Modal.error({ title: '提示信息', content: res.data.message });
                }
            });
        },
         changeReportStatue(ReportId, Status, Msg) {
            var self = this;
            let model = new Object();
            model.Id = ReportId;
            model.Status = Status;
            model.Opinion = Msg;
            this.$http.post("Report/PostUpStatus", model).then(
                function (res) {
                    if (res.data.status == 1) {
                        self.$Notice.success({ title: '操作成功！', desc: false });
                        self.getPageData();
                    }
                    else {
                        self.$Modal.error({ title: "提示信息", content: "操作失败!" });
                    }
                }
            );
        },
        pass(){
            this.showType = false;
            this.changeReportStatue(this.ReportId,'4','');
        },
        unpass(){
            this.showAudit = false;
            this.changeReportStatue(this.ReportId,'0',this.unPassReason);
        },
        unReview(ReportId){
            this.changeReportStatue(ReportId,'0','取消审核！');
        },
        ShowInfo(ReportId,TimesCycle){
            var self = this;
            this.$http.get("PotSeasonProduct", { params: { ReportId: ReportId,SeasonValue:TimesCycle } }).then(//获取数据编辑项的值
                function (res) {
                    if (res.data.status == 1) {
                        self.dataList = res.data.model;
                        self.showType = true;  
                        self.showEdit = false;                        
                    }
                    else {
                        self.$Modal.error({ title: "提示信息", content: "数据加载失败!!!" });
                    }
                }
            );
        },
        EditInfo(ReportId,TimesCycle){
            var self = this;
            this.$http.get("PotSeasonProduct", { params: { ReportId: ReportId,SeasonValue:TimesCycle } }).then(//获取数据编辑项的值
                function (res) {
                    if (res.data.status == 1) {
                        self.dataList = res.data.model;
                        self.ReportId = ReportId;
                        self.showType = true;
                        self.showEdit = true;                        
                    }
                    else {
                        self.$Modal.error({ title: "提示信息", content: "数据加载失败!!!" });
                    }
                }
            );
        },
        SearchAreaList() {
            var areaCode = this.userInfo.AreaCode;
            var areaList = [];
            if (areaCode != "530000000000" && areaCode != null) {
                var item = this.GetlocaStorage("areatreelist")[0];
                for (var i = 0; i < item.children.length; i++) {
                    if (item.children[i].value == areaCode) {
                        areaList.push(item.children[i]);
                    }
                }
            } else {
                areaList = this.GetlocaStorage("areatreelist");
            }
            this.AreaList = areaList[0].children;
        },
    },
    //创建Vue页面方法
    created: function () {
        //创业Vue前调用获取this.datas: {},//table数据对象
        this.getPageData();
        this.SearchAreaList();
    },
    watch: {
        //需要监听的在此处新增监听对象
    }
}
</script>
